Different ways to clone JavaScript object